﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AdminPage.aspx.cs" Inherits="Motesrummet.Layouts.Web.AdminPage" DynamicMasterPageFile="~masterurl/default.master" %>

<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">

</asp:Content>

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">

<SharePoint:CssRegistration ID="CssReg" name="jquery-ui.css" runat="server" EnableCssTheming="true" after="true"/>
<SharePoint:ScriptLink ID="jquery1" Name="/_layouts/Scripts/jquery-1.8.2.js" runat="server"></SharePoint:ScriptLink>
<SharePoint:ScriptLink ID="jquery2" Name="/_layouts/Scripts/jquery-ui.js" runat="server"></SharePoint:ScriptLink>
<%--<script src="/_layouts/Scripts/jquery-1.8.2.js" type="text/javascript"></script>
<script src="/_layouts/Scripts/jquery-ui.js" type="text/javascript"></script>
<link rel="stylesheet" href="/_layouts/CSS/jquery-ui.css" />--%>


<script type="text/javascript">
    //Dialog opening 
    function OpenDialog() {
        var options = SP.UI.$create_DialogOptions();
        //        options.url = "http://motesrummet.se/_layouts/AdminPage.aspx";
        options.url = "http://motesrummet.se/sites/stockholm/SiteAssets/admin.aspx";
        options.width = 850;
        options.height = 600;
        options.dialogReturnValueCallback = Function.createDelegate(null, CloseCallback);
        SP.UI.ModalDialog.showModalDialog(options);
    }

    var messageId;

    // Dialog callback 
    function CloseCallback(result, target) {

        if (result === SP.UI.DialogResult.cancel) {
            window.location.href = "http://motesrummet.se/sites/stockholm/";

        }
    }
    $(document).ready(function () {
        window.setTimeout(OpenDialog, 600);
    });
</script>

 <a href="Javascript:OpenDialog();" ></a>

</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
Application Page
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" >
My Application Page
</asp:Content>
